﻿namespace MSSqlSchemaDoc.Core.DataStructures
{
    using System;
    using System.Xml.Serialization;

    /// <summary>
    /// Represents a full text catalog.
    /// </summary>
    public class FullTextCatalog : IDataStructureObject
    {
        /// <summary>
        /// Gets or sets the database internal object id of the object.
        /// </summary>
        [XmlIgnore()]
        public int ObjectId { get; set; }

        /// <summary>
        /// Gets the full text catalog object type string.
        /// </summary>
        [XmlElement()]
        public DataStructureObjectType ObjectType
        {
            get { return DataStructureObjectType.FullTextCatalog; }
        }

        /// <summary>
        /// Gets or sets the name of the catalog.
        /// </summary>
        [XmlAttribute()]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this is the default full text catalog for the database.
        /// </summary>
        [XmlElement()]
        public bool IsDefault { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether accent sensitivity is on or off.
        /// </summary>
        [XmlElement()]
        public bool IsAccentSensitivityOn { get; set; }

        /// <summary>
        /// Gets or sets the documentation object.
        /// </summary>
        [XmlIgnore()]
        public IDocumentationObject Documentation { get; set; }

        /// <summary>
        /// Override the default behavior and rather return the name of the catalog.
        /// </summary>
        /// <returns>The name of the catalog.</returns>
        public override string ToString()
        {
            return this.Name;
        }
    }
}
